<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 590px;
            height: 580px;
            background: url(./images/xd1.jpg);

        }

        .box>p {
            background: rgba(0, 0, 0, 0.3);
            text-align: center;
            line-height: 40px;
            height: 40px;

        }

        .box:hover p {
            height: 0;
            overflow: hidden;
            transition: all .5s;
        }
    </style>
</head>

<body>

    <div class="box">
        <p>西点慕斯</p>
    </div>
</body>

</html>